Based upon the Test object in the TADS library, this overhauls it to actually work and provide needed functionality for actually ASSERTing if something is correct Moreover, the Test did not work and had issues with "leftovers" where each subsequent test depended upon the results of the previous test!
Test 'foo' ['x me', 'i', 'wear uniform'] [uniform] @location;
Would cause the uniform to be moved into the player character's inventory and then the commands X ME and then I and WEAR UNIFORM to be executed in response to TEST FOO. Both the location and the inventory entries are optional
class
Test : object
Superclass Tree (in declaration order)
Test
object
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
clearAssertBufferBeforeCmd
location
reportHolding
reportMove
restartBeforeTest
restoreStartStateAfterTest
testHolding
testList
testName
testOrder
Summary of Methods
getHolding
run
Properties
By default, we want to clear out the message buffer before each non-assert command, but you can change that for each test
The location to move the player character to before running the test script
Flag: do we want to report on what items were added to inventory? By default we do.
Flag: Do we want to report any change of location by looking around in the new one? By default we will.
If you need to restart the game BEFORE running the test activity and values
Restore game to where it was before this test. The default value is nil.
The objects to move into the player character's inventory before running the test script.
The list commands to be executed when running this test.
The test all command will run tests in ascending order of their test order. By default we use the sourceTextOrder.
Methods
Move everything in the testHolding list into the actor's inventory
Run this test by passing the commands into a script file to replay
Adv3Lite Library Reference Manual
Generated on 08/12/2025 from adv3Lite version 2.2.2